<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>

	<title>GESTOR INCIDENCIAS</title>
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<link rel="stylesheet" type="text/css" href="css/menu.css">
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"></script>
	
	<script src="js/menu.js"></script>
	
</head>

<body>

<?php
require('php/cabecera.php');
?>
<script>
		(function($){
				
		//cache nav
			var nav = $("#topNav");
				
			//add indicator and hovers to submenu parents
			nav.find("li").each(function() {
				if ($(this).find("ul").length > 0) {
					/*$("<span>").text("^").appendTo($(this).children(":first"));*/
					//show subnav on hover
					$(this).mouseenter(function() {
						$(this).find("ul").stop(true, true).slideDown();
					});
		
					//hide submenus on exit
					$(this).mouseleave(function() {
						$(this).find("ul").stop(true, true).slideUp();
					});
				}
			});
		})(jQuery);
</script>
		
<script>
		
	function mostrar(num, prin, fin){
		
		
		var buscar=document.getElementById("buscar");
		var tipo=document.getElementById("tipo");
		
		/*paginacion*/
		var numpag=10;
		var numero=num;
		var principio=prin+numero;
		
		//var final=fin+numero;
		var final=principio+numpag;
		/*fin paginacion*/
		
		var xmlhttp;
               if (window.XMLHttpRequest)
               {// code for IE7+, Firefox, Chrome, Opera, Safari
                    xmlhttp=new XMLHttpRequest();
                }
                else
                 {// code for IE6, IE5
                     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                 }
            xmlhttp.onreadystatechange=function()
             {
                if (xmlhttp.readyState==4 && xmlhttp.status==200)
                 {
				  	
				 	document.getElementById("busqueda").innerHTML=xmlhttp.responseText;             
                 }
				
               	
			   }
        
            xmlhttp.open("GET","php/mostrarincidencias.php?buscar="+buscar.value+"&tipo="+tipo.value+"&principio="+principio+"&fin="+final+"&numpag="+numpag,true); 
            xmlhttp.send();
			}
			
			
	
	</script>
	
<div id="contenido">
<?php
require('php/menuvincidencias.php');
?>
	
		<div id="principal">
			
			<h2><?php echo $xtituprof;?></h2>
			
			<BR>
			<!--<p>Busque la incidencia que desee</p>
			<br>-->
			<form>
			<table border="0">
				<tr>
					<td><?php echo $xprovbuscar2;?>: <select id="tipo">
						<option value='todos'><?php echo $xprovtodos;?></option>
						<option value='id_incidencia'><?php echo $xincidencia;?></option>
						<option value='id_dispositivo'><?php echo $xetidisp;?></option>
						<option value='id_estado'><?php echo $xestado;?></option>
					</select></td>
					<td><input type='text' id='buscar'></td>
					<td><input type='button' value='<?php echo $xprovbuscar;?>' onclick='mostrar(0,0,10)'></td>
				</tr>
			</table>
			

			</form>
			<div id="busqueda">
			</div>	
		</div>
		
	</div>
	
	<div id="pie">
		<?php 
		include("pie.php");
		?>
	</div>

</div>	
</body>
</html>
